package cn.itcast.hutool;

import cn.hutool.core.io.FileUtil;

import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

public class Test1 {

    public static void main(String[] args) throws IOException { 
        File file = FileUtil.writeBytes("123".getBytes(), "tempFile\\hutool.txt");
        //System.out.println(file.getAbsolutePath());
        
        write2File();
    }

    private static void write2File() throws IOException {
        File file1 = new File("tempFile\\hutool.txt");
        FileOutputStream fos = new FileOutputStream(file1);
        BufferedOutputStream bos = new BufferedOutputStream(fos);
        bos.write("123".getBytes());
        bos.close();
        fos.close();
    }
}
